<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<!DOCTYPE HTML>
<html>
<html lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>Highchart</title>
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
	    <link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
	    <script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
	    <script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
	    <link rel="stylesheet" href="/resources/demos/style.css">
	    <script src="../js/jquery.popupWindow.js"></script>
	    <script src="../js/highcharts.js"></script>
		<script src="../js/exporting.js"></script>

	<!-- 하이차트 1 -->
	<script type="text/javascript">
	$(function () {	
		
		$.ajax({
	        url : "admin_Chart_Basicbar.do",
	        dataType : "json",
	        success : function(data) {
	        	
	        	$.each(data.recruit_p,function(index,items){
	        		var x;
	        		x= items.recruit
	 	        	x = Number(x);
	        	
	        	$.each(data.recruit_n,function(index,items){
	        		var y; 
	        		y= items.recruit
	        		y = Number(y);
	        		
	        	 $('#container').highcharts({
	     	        title: {
	     	            text: '입사지원 신입 / 경력 현황',
	     	            x: -20 //center
	     	        },
	     	        xAxis: {
	     	            categories: ['2010년', '2011년', '2012년', '2013년', '2014년']
	     	        },
	     	        yAxis: {
	     	            title: {
	     	                text: '명수'
	     	            },
	     	            plotLines: [{
	     	                value: 0,
	     	                width: 1,
	     	                color: '#808080'
	     	            }]
	     	        },
	     	        tooltip: {
	     	            valueSuffix: '명'
	     	        },
	     	        legend: {
	     	            layout: 'vertical',
	     	            align: 'right',
	     	            verticalAlign: 'middle',
	     	            borderWidth: 0
	     	        },
	     	        series: [{
	     	            name: '신입',
	     	            data: [0, 3, 5, 6, x]
	     	        }, {
	     	            name: '경력',
	     	            data: [20, 35, 25, 30, y]
	     	        		}]
	     	        	});
					});
				});
			},

	        error : function(request, status, error) {
	           console.log("code:" + request.status + "\n"
	                 + "message:" + request.responseText
	                 + "\n" + "error:" + error);
									}
								});
							});
	
	</script>
	
	</head>
	<body>
		<p><div id="container" style="width: 440px; height: 380px; margin: 0"></div></p>
	</body>
</html>